package com.spring.trade.service.impl;

import com.spring.trade.po.TradeServiceRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.spring.trade.dao.TradeServiceRuleDao;
import com.spring.trade.service.ITradeServiceRuleService;

import java.util.List;

@Service
public class TradeServiceRuleServiceImpl implements ITradeServiceRuleService {
	@Autowired
	private TradeServiceRuleDao tradeServiceRuleDao;
	
/*	@Autowired
	private ITradeServiceInfoService tradeServiceInfoService;*/

	@Override
	public List<TradeServiceRule> findServiceRuleList(TradeServiceRule tradeServiceRule,Long doctorId) {
		List<TradeServiceRule> tradeServiceRuleList = null;
		if (tradeServiceRule.getServiceId() == 1){
			 tradeServiceRuleList = tradeServiceRuleDao.find("findServiceRuleList",tradeServiceRule);
		}else if (tradeServiceRule.getServiceId() == 2){
//			tradeServiceRuleList = tradeServiceInfoService.getServiceInfoBySerId(doctorId,tradeServiceRule.getServiceId());
		}
		return tradeServiceRuleList;
	}

	@Override
	public List<TradeServiceRule> findServiceRuleList(TradeServiceRule tradeServiceRule) {
		return tradeServiceRuleDao.find("findServiceRuleList",tradeServiceRule);
	}
}
